package robotleMvc.ui.topMenu
{
	import com.net.AssetData;
	import com.ui.containers.TitleWindow;
	import com.ui.controls.Button;
	import com.ui.controls.Icon;
	import com.ui.core.Align;
	import com.ui.data.ButtonData;
	import com.ui.data.IconData;
	import com.ui.data.TitleWindowData;

	
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;
	
	import robotleMvc.frameworks.topMenu.event.TopMenuEvent;
	import robotleMvc.ui.SkinType;
	import robotleMvc.ui.UIUtil;
	
	public class TopMenuView extends Pan3dWindow
	{
		private var _makeShadowBut:Button;
		private var _saveGlassBut:Button;
		private var _showTieXiaoBut:Button;
		private var _showGroundHightBut:Button;
		private var _fireBut:Button;

		public function TopMenuView(parent:Sprite)
		{
			super(parent);
			addPics();
			addButtons()
		}
		
		private function addPics():void
		{
			// TODO Auto Generated method stub
			
			// UIUtil.addButton(this,10,50,200,50,"ccav",0xffffff,12,BtnSkinType.NEW_DARK);

		}
		
		public function get showGroundHightBut():Button
		{
			return _showGroundHightBut;
		}

		public function get makeShadowBut():Button
		{
			return _makeShadowBut;
		}

		public function get showTieXiaoBut():Button
		{
			return _showTieXiaoBut;
		}

		public function get saveGlassBut():Button
		{
			return _saveGlassBut;
		}

		public function get fireBut():Button
		{
			return _fireBut;
		}


		protected function _seeBtnCilk(event:MouseEvent):void
		{
			this.dispatchEvent(new TopMenuEvent(TopMenuEvent.AN_CILK));
		}

		private function addButtons():void
		{
			var data:ButtonData=new ButtonData();
			//	data.labelData.textColor = 0x00ff00;
			//	data.upColor = 0x00ff00;
			//	data.rollOverColor = 0xffffff;
			//	data.downColor = 0xff0000;
			data.x=10;
			data.upAsset=new AssetData(SkinType.BUTTON_UP);
			data.downAsset=new AssetData(SkinType.BUTTON_DOWN);
			data.overAsset=new AssetData(SkinType.BUTTON_OVER);

			_makeShadowBut=new Button(data);
			_makeShadowBut.initToolTipManual();
			_makeShadowBut.toolTip.source="点击可以生存阴影";
			_makeShadowBut.htmlText="生存阴影";
			addChild(_makeShadowBut);
			_makeShadowBut.y=55;

			data=data.clone();

			_saveGlassBut=new Button(data);
			_saveGlassBut.initToolTipManual();
			_saveGlassBut.toolTip.source="点击可以生存草皮";
			_saveGlassBut.htmlText="生存草皮";
			addChild(_saveGlassBut);
			_saveGlassBut.y=85;

			data=data.clone();

			_showTieXiaoBut=new Button(data);
			_showTieXiaoBut.initToolTipManual();
			_showTieXiaoBut.toolTip.source="点击可以播放特效动画";
			_showTieXiaoBut.htmlText="特效动画";
			addChild(_showTieXiaoBut);
			_showTieXiaoBut.y=115;

			data=data.clone();

			_showGroundHightBut=new Button(data);
			_showGroundHightBut.initToolTipManual();
			_showGroundHightBut.toolTip.source="点击可以播生成新的地型高度图";
			_showGroundHightBut.htmlText="地形高度";
			addChild(_showGroundHightBut);
			_showGroundHightBut.y=145;

			_fireBut=new Button(data);
			_fireBut.initToolTipManual();
			_fireBut.toolTip.source="点击生成火把";
			_fireBut.htmlText="火把";
			addChild(_fireBut);
			_fireBut.y=55;
			_fireBut.x=100;

		}



	}
}
